package zigzag.designpattern.composite;

public class Client {
	public static void main(String args[]){
		Tree root= new Branch("Root");
		Tree branch1 = new Branch("B1");
		Tree branch2 = new Branch("B2");
		Tree branch3 = new Branch("B3");
		Tree branch4 = new Branch("B4");
		Tree leaf1 = new Leaf("L1");
		Tree leaf2 = new Leaf("L2");
		Tree leaf3 = new Leaf("L3");
		
		root.add(branch1);
		root.add(branch3);
		branch1.add(branch2);
		branch1.add(leaf1);
		branch2.add(branch4);
		branch2.add(leaf2);
		branch3.add(leaf3);
		
		root.printAll();
	}
}
